package com.xbzl.cly_demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName vehicles
 */
@TableName(value ="vehicles")
@Data
public class Vehicles implements Serializable {
    /**
     * 
     */
    @TableId(value = "vehicleId", type = IdType.AUTO)
    private Long vehicleid;

    /**
     * 
     */
    @TableField(value = "vehicleType")
    private String vehicletype;

    /**
     * 
     */
    @TableField(value = "owner")
    private Long owner;

    /**
     * 
     */
    @TableField(value = "status")
    private String status;

    /**
     * 
     */
    @TableField(value = "totalDistance")
    private BigDecimal totaldistance;

    /**
     * 
     */
    @TableField(value = "totalDuration")
    private BigDecimal totalduration;

    /**
     * 
     */
    @TableField(value = "averageSpeed")
    private BigDecimal averagespeed;

    /**
     * 
     */
    @TableField(value = "plateNum")
    private String platenum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Vehicles other = (Vehicles) that;
        return (this.getVehicleid() == null ? other.getVehicleid() == null : this.getVehicleid().equals(other.getVehicleid()))
            && (this.getVehicletype() == null ? other.getVehicletype() == null : this.getVehicletype().equals(other.getVehicletype()))
            && (this.getOwner() == null ? other.getOwner() == null : this.getOwner().equals(other.getOwner()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTotaldistance() == null ? other.getTotaldistance() == null : this.getTotaldistance().equals(other.getTotaldistance()))
            && (this.getTotalduration() == null ? other.getTotalduration() == null : this.getTotalduration().equals(other.getTotalduration()))
            && (this.getAveragespeed() == null ? other.getAveragespeed() == null : this.getAveragespeed().equals(other.getAveragespeed()))
            && (this.getPlatenum() == null ? other.getPlatenum() == null : this.getPlatenum().equals(other.getPlatenum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getVehicleid() == null) ? 0 : getVehicleid().hashCode());
        result = prime * result + ((getVehicletype() == null) ? 0 : getVehicletype().hashCode());
        result = prime * result + ((getOwner() == null) ? 0 : getOwner().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTotaldistance() == null) ? 0 : getTotaldistance().hashCode());
        result = prime * result + ((getTotalduration() == null) ? 0 : getTotalduration().hashCode());
        result = prime * result + ((getAveragespeed() == null) ? 0 : getAveragespeed().hashCode());
        result = prime * result + ((getPlatenum() == null) ? 0 : getPlatenum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", vehicleid=").append(vehicleid);
        sb.append(", vehicletype=").append(vehicletype);
        sb.append(", owner=").append(owner);
        sb.append(", status=").append(status);
        sb.append(", totaldistance=").append(totaldistance);
        sb.append(", totalduration=").append(totalduration);
        sb.append(", averagespeed=").append(averagespeed);
        sb.append(", platenum=").append(platenum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}